package com.net.xpay.core.service.safePay;

import com.net.xpay.common.domain.FlexibleStaffCard;
import com.net.xpay.common.domain.User;
import com.net.xpay.common.domain.notify.FlexibleStaffCardNotifyRecord;
import com.net.xpay.common.domain.notify.FlexibleStaffCardOrderNotifyRecord;
import com.net.xpay.core.model.ApplyFlexibleStaffCardModel;
import com.net.xpay.core.model.FlexibleStaffCardRepaymentTransferModel;

/**
 * 零工卡服务
 */
public interface FlexibleStaffCardService {

    /**
     * 开卡
     */
    FlexibleStaffCard applyFlexibleStaffCard(User user, ApplyFlexibleStaffCardModel applyModel);

    /**
     * 开卡通知
     * @param outBizNo 外部订单号
     * @param agreementNo 协议号
     * @param alipayUid 支付宝uid
     * @param bookId 记账本id
     * @param employeeCardNo 零工卡号
     */
    void updateFlexibleStaffCard(String outBizNo, String agreementNo, String alipayUid, String bookId, String employeeCardNo);

    /**
     * 回调通知第三方平台
     */
    void notifyRecord(FlexibleStaffCardNotifyRecord record);

    /**
     * 灵工卡解约
     */
    void unsignFlexibleStaffCard(User user, String importBizNo);


    /**
     * 灵工卡支出 扣款、提现
     */
    void transferRepayment(User user, FlexibleStaffCardRepaymentTransferModel model);

    /**
     * 灵工卡支出回调通知系统
     */
    void onRepaymentTransferNotify(String outBizNo, String orderId, String payFundOrderId);

    /**
     * 灵工卡支出回调通知第三方
     */
    void notifyOrderRecord(FlexibleStaffCardOrderNotifyRecord record);
}
